package com.paic.mhis.hcpms.common.sso.biz.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;
import com.paic.mhis.core.auth.biz.service.UserDetails;
import com.paic.mhis.hcpms.common.sso.dto.CognosReportDTO;
import com.paic.mhis.hcpms.common.sso.dto.CognosRoleDTO;
import com.paic.pafa.exceptions.BusinessException;

public interface CognosReportService {

	public void batchDeleteCognosReportInfo(String[] reportListId);

	public Map<String, Object> loadCognosReportInfo(UserDetails user, String reportName, int startNum, int endNum,
			Map<String, Object> map);

	/**
	 * 报表信息
	 * 
	 * @param paramMap
	 * @return
	 * @throws BusinessException
	 */
	public List<CognosReportDTO> findCognosReports(Map<String, Object> paramMap) throws BusinessException;

	/**
	 * 处理报表信息的新增，删除，修改
	 * 
	 * @param user
	 * @param processType
	 * @param bean
	 * @return
	 */
	public Map<String, Object> processCognosReportInfo(UserDetails user, String processType, CognosReportDTO bean);

	/**
	 * 处理报表信息的加载数据
	 * 
	 * @param user
	 * @param reportName
	 * @param startNum
	 * @param endNum
	 * @param map
	 * @return
	 */
	public Map<String, Object> loadSignleCognosReportInfo(UserDetails user, String reportName, int startNum,
			int endNum, Map<String, Object> map);

	/**
	 * 新增角色与报表关系
	 * 
	 * @param cognosRoles
	 * @throws BusinessException
	 */
	public boolean saveCognosReportAuthorize(JSONObject transferJson, String userName, Map<String, Object> paramMap)
			throws BusinessException;

	/**
	 * 查询角色与报表信息
	 * 
	 * @param paramMap
	 * @throws BusinessException
	 */
	public List<CognosRoleDTO> cognosReportQueryRole(Map<String, Object> paramMap) throws BusinessException;

	/**
	 * 展示当前已授权报表信息
	 * 
	 * @param paramMap
	 * @return
	 * @throws BusinessException
	 */
	public List<CognosReportDTO> cognosReportAuthorizeQuery(Map<String, Object> paramMap) throws BusinessException;

	/**
	 * 保存授权的信息
	 * 
	 * @param roleIds
	 * @param reportIds
	 * @param user
	 */
	public void saveCognosReportAuthorizeInfo(String[] roleIds, String[] reportIds, UserDetails user);

	public List<CognosReportDTO> loadReportByRoleId(String roleId);

	public List<CognosRoleDTO> loadRoleInfo();

}
